package com.ljf.finance.infra.assembler;

import com.ljf.finance.vo.FinanceDatVirtualAccountVO;
import com.ljf.finance.vo.FinanceRelAccountReportDetailReportDataVO;
import com.ljf.finance.vo.FinanceRelAccountReportDetailVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * 账户报表账户关联  类型转换类
 *
 * @author LJF
 * @since 2024-12-09
 */
@Mapper
public interface FinanceRelAccountReportDetailAssembler {

    FinanceRelAccountReportDetailAssembler INSTANCE = Mappers.getMapper(FinanceRelAccountReportDetailAssembler.class);

    @Mapping(target = "sort", source = "detail.sort")
    @Mapping(target = "accountName", source = "account.name")
    FinanceRelAccountReportDetailReportDataVO toReportDataVO(FinanceRelAccountReportDetailVO detail, FinanceDatVirtualAccountVO account);

}
